package com.example.administrator.android2019.music;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageButton;
import android.widget.SeekBar;
import android.widget.TextView;

import com.example.administrator.android2019.R;

/**
 * 获取Intent传递的参数
 * 修改TextView内容 MP3文件名
 * 歌词内容的显示
 * 音乐的播放、暂停、继续、停止功能
 * 进度条的时间显示
 * 进度条拖动事件
 *
 * */
public class MUsicPlayActivity extends AppCompatActivity {

     TextView tv_title,tv_lrc;
     ImageButton btn_play,btn_pause,btn_stop;
     SeekBar seekBar;
     TextView tv_progress,tv_total;

     String mp3Name,sdPath;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_music_play2);
        init();
        Intent intent=this.getIntent();
        mp3Name=intent.getStringExtra("mp3Name");
        sdPath=intent.getStringExtra("sdPath");
        tv_title.setText(mp3Name);
    }

    private void init() {

        tv_title=findViewById(R.id.music_tv_title);
        tv_lrc=findViewById(R.id.music_tv_lyric);
        tv_progress=findViewById(R.id.music_tv_progress);
        tv_total=findViewById(R.id.music_tv_total);
        btn_play=findViewById(R.id.music_btn_play);
        btn_pause=findViewById(R.id.music_btn_pause);
        btn_stop=findViewById(R.id.music_btn_stop);
        seekBar=findViewById(R.id.music_seekbar);

    }
}
